/**
 * jims
 */
package com.jims.master.modules.blood.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jims.master.common.persistence.DataEntity;
import org.hibernate.validator.constraints.Length;

import java.util.Date;

/**
 * 血液成分字典Entity
 * @author fengyg
 * @version 2017-04-06
 */
public class BloodComponent extends DataEntity<BloodComponent> {
	
	private static final long serialVersionUID = 1L;
	private String bloodCode;		// 血液成分
	private String bloodName;		// 血液成分名称
	private String inputCode;		// input_code
	private String usefulLife;		// 保存天数
	private String temperature;		// 保存温度
	private String unit;		// 计量单位
	private Date stopDate;		// 停止日期
	private String sort;		// 排序序号
	
	public BloodComponent() {
		super();
	}

	public BloodComponent(String id){
		super(id);
	}

	@Length(min=1, max=10, message="血液成分长度必须介于 1 和 10 之间")
	public String getBloodCode() {
		return bloodCode;
	}

	public void setBloodCode(String bloodCode) {
		this.bloodCode = bloodCode;
	}
	
	@Length(min=0, max=40, message="血液成分名称长度必须介于 0 和 40 之间")
	public String getBloodName() {
		return bloodName;
	}

	public void setBloodName(String bloodName) {
		this.bloodName = bloodName;
	}
	
	@Length(min=0, max=64, message="input_code长度必须介于 0 和 64 之间")
	public String getInputCode() {
		return inputCode;
	}

	public void setInputCode(String inputCode) {
		this.inputCode = inputCode;
	}
	
	public String getUsefulLife() {
		return usefulLife;
	}

	public void setUsefulLife(String usefulLife) {
		this.usefulLife = usefulLife;
	}
	
	@Length(min=0, max=24, message="保存温度长度必须介于 0 和 24 之间")
	public String getTemperature() {
		return temperature;
	}

	public void setTemperature(String temperature) {
		this.temperature = temperature;
	}
	
	@Length(min=0, max=10, message="计量单位长度必须介于 0 和 10 之间")
	public String getUnit() {
		return unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getStopDate() {
		return stopDate;
	}

	public void setStopDate(Date stopDate) {
		this.stopDate = stopDate;
	}
	
	public String getSort() {
		return sort;
	}

	public void setSort(String sort) {
		this.sort = sort;
	}
	
}